{:W('Template/top')}
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">通用产品</a>&gt;通用产品列表</div>
        <div class="cTitle2">通用产品列表</div>
        <div class="main-search" style="margin-bottom: 28px">
            <form class="form-inline">
                <form method="get" value="{:U('Product/index', array('id' => 111))}">
                    <div class="form-group">
                        <input type="text" name="name" class="form-control" placeholder="请输入代码/产品名称" value="{$name}"/>
                    </div>
                    <button type="submit" class="btn btn-warning">查询</button>
                </form>
                <div class="pull-right">
                    <a href="{:U('Product/add',array('id' => 111))}" class="btn btn-info">新增</a>
                    <input id="chkr" type="hidden" value="{:U('Product/delete')}"/>
                    <input id="chka" type="hidden" value="{:U('Product/add')}"/>
                    <input id="chkState" type="hidden" value="{:U('Product/index')}"/>
                    <button type="button" class="btn btn-danger" onclick="jqchk()">删除</button>
                </div>
            </form>
        </div>
        <form method="post" action="">
            <table class="cTable table-hover" width="100%">
                <tr>
                    <th width="8%" style="padding-left:5px;"><input type="checkbox" id="male"
                                                                    onclick="selectAll(this);"/>&nbsp;<label for="male"
                                                                                                             style="font-weight: bold">全选 </label>
                    </th>
                    <th width='10%'>代码</th>
                    <th width='15%'>产品名称</th>
                    <th width='10%'>同行价</th>
                    <th width='15%'>参数</th>
                    <th width='15%'>产品录入</th>
                    <th width='15%'>产品状态</th>
                    <th width='10%'>创建时间</th>
                    <th width="12%">操作</th>
                </tr>
                <volist name='info' id='v'>
                    <tr>
                        <td style="padding-left:10px;text-align: left"><input name="subBox" type="checkbox"
                                                                              class="checkitem" value="{$v.id|setEncrypt}"/></td>
                        <td>20{$v.id}</td>
                        <td class="text-c1">{$v.name}</td>
                        <td class="text-c3">{$v.price_agency|getYuan}</td>
                        <td class="text-c1">
                            <if condition="$v['para_type'] eq 1">
                                保险 {$v.para_value}
                            </if>
                        </td>
                        <td class="text-c5">{$v.user_name}</td>
                        <td class="text-c1">
                            <if condition="$v.state eq 1"><span style="color:#000666">未提交</span>
                                <elseif condition="$v.state eq 2"/>
                                <span style="color:blue">已审核，已上架</span>
                                <elseif condition="$v.state eq 3"/>
                                <span style="color:darkgreen">已提交，待审核</span>
                                <elseif condition="$v.state eq 4"/>
                                <a href="javascript:void(0)" data-toggle="tooltip" data-placement="top"
                                   title="{$v.audit_memo}"><span style="color:red">审核失败</span></a>
                                <elseif condition="$v.state eq 5"/>
                                <span style="color:red">已下架</span>
                            </if>
                        </td>
                        <td>{$v.create_time}</td>
                        <td>
                            <div class="btn-group">
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                                        aria-expanded="false">
                                    操作<span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a onclick="changeState({$v.id}, {:Common\\Top::ProductStateSubmitted})"
                                           style="cursor: pointer;">提交</a></li>
                                    <li><a href="{:U('Product/edit',array('id'=>I('get.id'), 'tid'=>$v['id']))}">编辑</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </volist>
            </table>
        </form>
        <notempty name="info">
            <div class="pagebox">
                {$page}
            </div>
        </notempty>
    </div>
</div>

{:W('Template/bottom')}

</body>
</html>